package com.ruoyi.process.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.process.mapper.WorkLoadplateMapper;
import com.ruoyi.process.domain.WorkLoadplate;
import com.ruoyi.process.service.IWorkLoadplateService;

/**
 * 装盘管理Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-12
 */
@Service
public class WorkLoadplateServiceImpl implements IWorkLoadplateService
{
    @Autowired
    private WorkLoadplateMapper workLoadplateMapper;


    @Override
    public List<WorkLoadplate> selectWorkLoadplateByuserId(Long userId)
    {
        return workLoadplateMapper.selectWorkLoadplateByuserId(userId);
    }
    /**
     * 查询装盘管理
     *
     * @param workLoadplateId 装盘管理ID
     * @return 装盘管理
     */
    @Override
    public WorkLoadplate selectWorkLoadplateById(Long workLoadplateId)
    {
        return workLoadplateMapper.selectWorkLoadplateById(workLoadplateId);
    }

    /**
     * 查询装盘管理列表
     *
     * @param workLoadplate 装盘管理
     * @return 装盘管理
     */
    @Override
    public List<WorkLoadplate> selectWorkLoadplateList(WorkLoadplate workLoadplate)
    {
        return workLoadplateMapper.selectWorkLoadplateList(workLoadplate);
    }

    /**
     * 新增装盘管理
     *
     * @param workLoadplate 装盘管理
     * @return 结果
     */
    @Override
    public int insertWorkLoadplate(WorkLoadplate workLoadplate)
    {
        workLoadplate.setCreateTime(DateUtils.getNowDate());
        return workLoadplateMapper.insertWorkLoadplate(workLoadplate);
    }

    /**
     * 修改装盘管理
     *
     * @param workLoadplate 装盘管理
     * @return 结果
     */
    @Override
    public int updateWorkLoadplate(WorkLoadplate workLoadplate)
    {
        workLoadplate.setUpdateTime(DateUtils.getNowDate());
        return workLoadplateMapper.updateWorkLoadplate(workLoadplate);
    }

    /**
     * 批量删除装盘管理
     *
     * @param workLoadplateIds 需要删除的装盘管理ID
     * @return 结果
     */
    @Override
    public int deleteWorkLoadplateByIds(Long[] workLoadplateIds)
    {
        return workLoadplateMapper.deleteWorkLoadplateByIds(workLoadplateIds);
    }

    /**
     * 删除装盘管理信息
     *
     * @param workLoadplateId 装盘管理ID
     * @return 结果
     */
    @Override
    public int deleteWorkLoadplateById(Long workLoadplateId)
    {
        return workLoadplateMapper.deleteWorkLoadplateById(workLoadplateId);
    }
}
